package com.cac.demo.util.adapter;

/**
 * @className: BaseException
 * @description: （描述这个类的作用）
 * @author:
 * @date: 2024/6/22 11:12:12 周六
 * @version: 1.0
 */
public class BaseException extends RuntimeException {
    private static final long serialVersionUID = 23456789L;
    private int code = 500;
    private String message;
    private String detailMessage;

    public BaseException(String message) {
        super(message);
        this.message = message;
    }

    public BaseException(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public BaseException(String message, Throwable cause) {
        super(message, cause);
        this.message = message;
    }

    public BaseException(int code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return this.code;
    }

    public String getDetailMessage() {
        return this.detailMessage;
    }

    public void setDetailMessage(String detailMessage) {
        this.detailMessage = detailMessage;
    }
}
